home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / pc_board / clprnt23.zip / CL-PRINT.DOC < prev    next >
Text File  |  1992-03-12  |  14KB  |  297 lines

  1.                           CL-Print Version 2.30
  2.                     Caller Log Comment for PCBoard 14.x
  3.  
  4. By Gary Meeker                                                      03/12/92
  5.           ______________________________________________________
  6.  
  7.  
  8. I looked at several programs to this job but they all used a fixed format or
  9. inserted their name in the comment.   They were also written in C, Pascal or
  10. QuickBasic and were rather bulky for the job.   All I wanted was a simple
  11. program to place any desired comment in the CALLER file. The program had to
  12. maintain the 64 character fixed length format (62 characters text,CR,LF) and
  13. a few substitutions would be handy, like /T for 'HH:MM' (current time), /D
  14. for 'MM-DD-YY' (current date),  /A for ' at MM-DD-YY HH:MM:SS' and  /L for
  15. 'MM-DD-YY (HH:MM)' (short cuts for current date and time in PCBoard formats).
  16. Also /S for 6 spaces (to make indenting easy) and // to actually include a
  17. '/' in the text. The result of this was CL-PRINT.COM written in assembly for
  18. speed and size. It is less than 1K in length so fits into 1 cluster on most
  19. drives. (1023 Bytes, that was tough to keep below as I added features.)
  20. Version 2 has grown, but remains under 2k (2045) which is still 1 cluster
  21. on most Hard Drives.
  22.  
  23.  
  24.     Format:   CL-PRINT filespec logstring
  25.  
  26.     Remarks:  The filespec parameter may include a drive letter
  27.               and a path in addition to the filename for the
  28.               CALLER file.
  29.  
  30.               Logstring may consist of text characters enclosed
  31.               within (double) quote marks or ASCII decimal codes
  32.               whose numbers are separated by commas. (You may
  33.               seperate enteries by a semi-colon or space also.)
  34.  
  35.     Example:  To indicate the completion of the event you would enter
  36.  
  37.          CL-PRINT C:\PCB\CALLER "/SScheduled Event Ended/A"
  38.  
  39.     Example:  To indicate a program logging on you might enter
  40.  
  41.          CL-PRINT C:\PCB\CALLER "/L PCBFILE.EXE 3.1ß (Event) (G) BEGIN"
  42.  
  43.               or to enter 'ß' you might use decimal code entry as
  44.  
  45.          CL-PRINT C:\PCB\CALLER "/L PCBFILE.EXE 3.1",225," (Event) (G) BEGIN"
  46.  
  47. Anything within the quotes is included in the text string for the comment
  48. except the '/' character which is the substitute switch.  The character
  49. following the '/'is also not included unless it is another '/'. If you need
  50. to include the double quote character itself, you can use decimal entry
  51. format or use single quotes to enclose the string. Whichever quote starts
  52. the string must be the same quote to end the string. Other than that they
  53. are interchangable and the line
  54.  
  55.          CL-PRINT C:\PCB\CALLER "/L PCBFILE.EXE 3.1",225,' (Event) (G) BEGIN'
  56.  
  57. would be identical to the previous example. The best way to understand it
  58. all is to play with it. Just use a dummy filename for the CALLER filename
  59. so as not to bother it until you are ready. If the file does not exist it
  60. will be created (new with version 2).
  61.  
  62. The substitute characters are
  63.  
  64. /A for ' at MM-DD-YY HH:MM:SS'  - Used mainly at the end of a comment
  65. /D for 'MM-DD-YY'               - Used anywhere you need the current date
  66. /L for 'MM-DD-YY (HH:MM)'       - Used mainly at the start of a comment
  67. /S for 6 spaces                 - Used mainly at the start of a comment
  68. /T for 'HH:MM'                  - Used anywhere you need the current time
  69. /* for 62 astrics               - Used anywhere, will create a second line
  70. // for '/'                      - Used to include a '/' character
  71. /Q quiet mode                   - Used to suppress program output to console
  72. /N New file (don't append)      - Used to start a new file
  73. /Z ASCIIZ                       - Used to suppress padding of Numeric Variables
  74.  
  75. The Substitute characters may be used inside or outside the quotes so
  76.  
  77.          CL-PRINT C:\PCB\CALLER /S,"Scheduled Event Ended",/A
  78.  
  79. is identical to the previous example.
  80.  
  81. New with version 2 is the ability to use @ variables (single letters, not
  82. the full word variables used in PCBoard, with the 128 character command line
  83. limit imposed by DOS, it wasn't worth trying to use the long variables).
  84. If the @ symbol is found in the command line, PCBOARD.SYS, PCBOARD.DAT &
  85. USERS files are read (in that order). PCBOARD.SYS & PCBOARD.DAT must be in
  86. the current directory so you may need to change to the proper directory
  87. before running CL-PRINT (New with v2.30 allows use of environment variables
  88. PCBDRIVE & PCBDIR to locate PCBOARD.SYS & PCBOARD.DAT). PCBOARD.DAT file
  89. is read only to obtain the location & filename of the USERS file. This
  90. eliminates the need to use any kind of config file for CL-PRINT or extra
  91. command line parameters to locate files & allows the full command line for
  92. generating the desired text. A lot of the variables probably will never be
  93. used but I included just about everyting I could to make everyone happy.
  94. You can even use CL-PRINT to generate a batch file that could then be executed.
  95.  
  96. The Substitute Variables are
  97.  
  98. @F - First Name (Proper Case 15 characters)
  99. @? - Password (12 characters)
  100. @N - User Full Name (25 characters)
  101. @C - City, State (24 characters)
  102. @B - Bus/Data Phone (13 characters)
  103. @H - Home/Voice Phone (13 characters)
  104. @D - Last Date On (MM-DD-YY)
  105. @T - Last Time On (HH:MM)
  106. @! - Expert Mode (Y or N)
  107. @P - Default Protocol - Single Letter
  108. @L - Last Dir Scan (MM-DD-YY)
  109. @A - Security Level Access (3 characters - Numeric)
  110. @# - Number of Times On System (5 characters - Numeric)
  111. @M - Time Spent on Last Call (5 characters - Numeric)
  112. @E - Expiration Date  (MM-DD-YY)
  113. @X - Expiration Sec Level (3 characters - Numeric)
  114. @U - User Maintained Comment (30 characters)
  115. @S - Sysop Maintained Comment (30 characters)
  116. @R - Record Number (5 characters - Numeric)
  117. @G - Time User Logged On (HH:MM)
  118. @Z - Language Extension (4 characters) - or blank if default
  119. @* - Time Remaining (5 characters - Numeric)
  120. @V - Event Time (HH:MM)
  121. @= - FileName based on Users Full Name (useful in batch files)
  122.      (up to 8 characters from First Name & 3 characters from Last Name,
  123.      Only 0-9 & A-Z are used and any other character is changed to '$'
  124.      to prevent illegal DOS filenames from being created.) Users with a
  125.      single name will not have an extension on the filename. Users with
  126.      more than 2 names will use the 2nd name for the extension.
  127.  
  128.      Examples:
  129.  
  130.      User Name                  FileName
  131.      -------------------------  ------------
  132.      CHRISTOPHER JUDITH         CHRISTOP.JUD
  133.      SYLVESTER HALL             SYLVESTE.HAL
  134.      O.LENNOX DOOLEY            O$LENNOX.DOO
  135.      FRANCES BOBSMITH           FRANCES.BOB
  136.      J.R. HOLLY                 J$R$.HOL
  137.      BOB ELY                    BOB.ELY
  138.      LAWRENCE KESTELROT         LAWRENCE.KES
  139.      SAM O'PRY                  SAM.O$P
  140.      JUNG-YUL LEE               JUNG$YUL.LEE
  141.      L. WILLARD                 L$.WIL
  142.      GEOFFREY WARREN SPARK      GEOFFREY.WAR
  143.      WAYNE STEINARD TAYLOR      WAYNE.STE
  144.      ONELONGNAME                ONELONGN.
  145.      A                          A.
  146.  
  147.  
  148. Any other Character following the @ will be printed (but the @ will not, use
  149. @@ to print a single @ symbol).  If /Z is used it must be used before any @
  150. variables. It causes numeric variables not to be padded to the fixed lengths
  151. listed above (3 or 5 characters). Strings are always padded to full length.
  152.  
  153. Example:
  154.  
  155.          CL-PRINT C:\PCB\MAIN\CALLER /Q,/S,"Last On: @D (@T)"
  156. or
  157.          CL-PRINT C:\PCB\MAIN\CALLER /Q,/Z,/S,"Last On: @D (@T) for @M Minute(s)"
  158.  
  159. This example when run in your $$LOGON.BAT comes in handy for CALLS.EXE along
  160. with the modifications I made to it (this will be available from my BBS as
  161. CL14S23A.ZIP),   The entry allows the generation of a Report:
  162.  
  163.  
  164.                             -= Last Called In =-
  165.  
  166.      Within One Week:    59 (28.1%) │░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█
  167.         Previous Day:    44 (21.0%) │▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█
  168.             Same Day:    32 (15.2%) │▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█
  169.     Within Two Weeks:    18 ( 8.6%) │░░░░░░░░░░░░█
  170.     Within One Month:    14 ( 6.7%) │▓▓▓▓▓▓▓▓▓█
  171.   Within Four Months:     9 ( 4.3%) │▒▒▒▒▒▒█
  172.            New Users:     7 ( 3.3%) │░░░░█
  173.    Within Six Months:     5 ( 2.4%) │▓▓▓█
  174.   Within Nine Months:     4 ( 1.9%) │▒▒█
  175.    Within Two Months:     4 ( 1.9%) │░░█
  176.     Within Two Years:     3 ( 1.4%) │▓█
  177.      Within One Year:     1 ( 0.5%) │█
  178.  
  179. An Example of a batch file might be:
  180.  
  181. CL-PRINT DOIT.BAT "/N/Q/Z@@ECHO OFF",13,10,"IF !@R!==!2000! COPY YEAH GEN\NEWS"
  182.  
  183. NOTE: SHARE must be loaded if you intend to write to the CALLER log during
  184.       $$LOGON.BAT or $$LOGON.BAT as PCBoard has the file open and has written
  185.       entries to it prior to calling the batch files. If SHARE is not loaded
  186.       you will write over the top of the entries PCBoard has made. Also,
  187.       this can only be done on Network verisons /E & /U and you CAN NOT
  188.       use it on /D or /S versions as PCBoard has the USERS file open in
  189.       DENY READ/WRITE on these versions, so the file can not be opened by
  190.       CL-PRINT to obtain the information desired. This is true in $$LOGON.BAT
  191.       as well as PCBTEST.BAT, etc. As long as no '@' variables are used,
  192.       there should be no problem writing messages to the CALLER log at these
  193.       times though.
  194.  
  195. Other uses for CL-PRINT would be to create batch files on the fly that can
  196. then be executed, such as a printer redirection using PC Magazines PRN2FILE
  197.  
  198. CL-PRINT REDIRECT.BAT /N,'PRN2FILE C:\PCB\DL\@='
  199. CALL REDIRECT.BAT
  200. IF EXIST REDIRECT.BAT DEL REDIRECT.BAT
  201. CL-PRINT DELETEIT.BAT /N,'IF EXIST C:\PCB\DL\@= DEL C:\PCB\DL\@='
  202.  
  203. The first line would create a batch file named REDIRECT.BAT containing the line
  204.  
  205. PRN2FILE C:\PCB\DL\GARY.MEE
  206.  
  207. if I was the User on the BBS at the time. And the second line would execute
  208. the new batch file. No trapping is done for illegal device names contained in
  209. the Users name at this time. If it is a problem, I can add it somewhere down
  210. the road. The 3rd deletes the batch file. The last line creates a batch file
  211. called DELETE.BAT and you would add the lines:
  212.  
  213. IF EXIST DELETEIT.BAT CALL DELETEIT.BAT
  214. IF EXIST DELETEIT.BAT DEL DELETEIT.BAT
  215.  
  216. to your $$LOGOFF.BAT to execute the batch file and then delete it. The
  217. batch file would contain the line:
  218.  
  219. IF EXIST C:\PCB\DL\GARY.MEE DEL C:\PCB\DL\GARY.MEE
  220.  
  221. Note: CL-PRINT always appends to the file specified, so if you don't delete
  222. it, it will continue to grow. New with v2.30 you can specify a /N to cause
  223. the file to not be appended. This will start a NEW file.
  224.  
  225. ---------------------------------------------------------------------------
  226.  
  227. License info
  228. ------------
  229. CL-PRINT is copyrighted.  You are hereby granted a license  to use, copy,
  230. and distribute it freely  provided no modification is made  to the program
  231. or this documentation,  documentation  stays with the program and there is
  232. no charge for the service. You can modify it but don't distribute modified
  233. copies.
  234.  
  235. This program is being released as Public Domain but if you want to send me
  236. money, I'll take it (gotta get another CD-Rom Drive for the BBS someway.)
  237. I have checked carefully to make sure that no combination of entries can
  238. lock up the computer, scramble the CALLERS log or otherwise create problems,
  239. but none the less make a backup before trying out this or any program.
  240.  
  241. The program is distributed AS-IS with no warranty expressed or implied.
  242. It is the responsibility of each user to determine the fitness of this
  243. program. The author cannot be held responsible for damages caused by the
  244. use of the program.
  245.  
  246. Any Questions, Comments or Requests for changes can be directed thru my BBS:
  247.  
  248. SHARP Technical Support Line BBS (404) 962-1788  9600/2400/1200/300 24 Hours.
  249.  
  250. via Fax: (404) 995-0613
  251.  
  252. or via mail:
  253.  
  254. Gary Meeker
  255. C/O SHARP Electronics Corporation
  256. 725-C Old Norcross Road
  257. Lawrenceville, GA  30245
  258.  
  259.  
  260. ACKNOWLEDGEMENTS
  261.  
  262. PCBoard is a registered trademark of the Clark Development Company.
  263.  
  264. I would like to thank Fred Clark and the Clark Development Company
  265. Program Team for developing such an outstanding BBS program and for
  266. their continued support to customers and third party software
  267. developers.
  268.  
  269. History:
  270.  
  271. 03-07-91  V1.00  Initial Release
  272.  
  273. 02-14-92  V2.00  Added @ Variable subsitution & reading of
  274.                  PCBOARD.SYS, PCBOARD.DAT & USERS File if variable is used.
  275.                  Added file creation if file does not exist.
  276.  
  277. 02-22-92  V2.10  Changed Mode files were opened in to avoid SHARE violations
  278.                  and added better error message displays to indicate just
  279.                  what error was occuring when opening a file. Also changed
  280.                  DOCS to explain the need for SHARE.
  281.  
  282. 03-11-92  V2.20  Added @= for a FileName to be created from Users Name
  283.                  (8 characters from First Name & 3 characters from Last Name)
  284.  
  285. 03-12-92  V2.30  Corrected @= variable to work on First names longer than 8
  286.                  characters. Will now skip to the last name and pick up 3
  287.                  characters from the last name. Also will translate illegal
  288.                  DOS filename characters (and more) to '$'. No checking is
  289.                  done for illegal device names so beware.
  290.  
  291.                  Added Environment checking if the PCBOARD.SYS & PCBOARD.DAT
  292.                  files are not found in the current directory, then the DOS
  293.                  environment variables PCBDRIVE & PCBDIR will be checked and
  294.                  the file will be checked for in that directory.
  295.  
  296.                  Added /N to start a NEW output file instaed of appending it.
  297.